package com.zxc.oauth.exception

enum class OAuthExceptionCode(

    private var code: Int,

    private var message: String
) {

    LOGIN_ERROR(2200, "登陆异常，令牌签发失败"),

    USER_NOT_LOGGED_IN(2001, "用户未登录，请登录！"),
    USER_AUTH_FAILED(2006, "用户权限认证失败, 请重新登录"),
    USER_LOGIN_ERROR(2002, "账号不存在或密码错误！"),
    USER_ACCOUNT_FORBIDDEN(2003, "账号已被禁用！"),
    USER_NOT_EXIST(2004, "用户不存在！"),

    ADMIN_NOT_LOGGED_IN(2101, "未登录，请登录！"),
    ADMIN_AUTH_FAILED(2106, "权限认证失败, 请重新登录"),
    ADMIN_LOGIN_ERROR(2102, "账号不存在或密码错误！"),
    ADMIN_ACCOUNT_FORBIDDEN(2103, "账号已被禁用！"),
    ADMIN_NOT_EXIST(2104, "账号不存在！"),
    ADMIN_NOT_PERMISSIONS(2106, "无访问权限！");

    fun getCode(): Int{
        return code
    }

    fun getMessage(): String{
        return message
    }
}